using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;
using System.Windows.Forms;

namespace Dogfight2008
{
  public class GameOverState : IState
  {
    #region IState Members

    public DFState KeyDown(Keys key)
    {
      return DFState.PressFire;
    }

    public DFState KeyUp(Keys keys)
    {
      return DFState.GameOver;
    }

    double t = 0;
    public DFState Tick(double deltaMS)
    {
      t += deltaMS;
      if (t < 20000)
        return DFState.GameOver;
      else
        return DFState.PressFire;
    }

    public void Render(IRenderer renderer)
    {
      StateUtil.RenderNiceCenterText(renderer, "Game Over");
      renderer.Color(Color.Black);
      renderer.TextAt("t=" + t.ToString(), new Uniform(0), new Uniform(0), new Uniform(0.1), Anchor.TopLeft);
    }

    #endregion
  }
}
